// IF.h: interface for the CIF class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IF_H__C58C92D1_FCA6_45CE_A288_F8E882C4793E__INCLUDED_)
#define AFX_IF_H__C58C92D1_FCA6_45CE_A288_F8E882C4793E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CTCPClient;
class CAccount;
class CSMSItem;
class CIF  : public CTCPClient
{
public:
	enum _IF_STATE {IF_IDLE, IF_CONNECTTING, IF_CONNECTTED, IF_WAIT_LOGIN_RESP, IF_LOGINED }  m_State;
public:
	CIF();
	virtual ~CIF();
public:
	virtual BOOL Send(CSMSItem* pSMS)=0; //send sms to buffer
	void SetParent(CAccount* p)
	{
		m_pParent =p;
	}
	CAccount* GetParent()
	{
		return m_pParent;
	}
protected:
	CAccount* m_pParent;
public:
	virtual void PeriodDispatch();
    LOG4CPLUS_CLASS_DECLARE( _s_logger );

};

#endif // !defined(AFX_IF_H__C58C92D1_FCA6_45CE_A288_F8E882C4793E__INCLUDED_)
